class Student:

    def __init__(self):
        self.name = "张三"
        self.number = 231001
        self.chineseBook = 85
        self.math = 90
        self.english = 82

    def sum_score(self):
        ret_sum = self.math + self.english + self.chineseBook
        return ret_sum

    def avg_score(self):
        ret_avg = self.sum_score() / 3
        return ret_avg

    def max_score(self):
        ret_max = max(self.math, self.chineseBook, self.english)
        return ret_max

    def Print(self):
        print(f"姓名:{self.name} 学号:{self.number} 总分:{self.sum_score()} 平均分:{self.avg_score():.2f} 最高分:{self.max_score()}")


class Course:

    def __init__(self, number, name, teacher, location):
        self.number = number
        self.name = name
        self.teacher = teacher
        self._location = location

    def show_info(self):
        print(f"编号:{self.number} 名称:{self.name} 任课教师:{self.teacher} 上课地点:{self._location}")

MyClass1 = Course(1, "操作系统", "王老师", "线上")
MyClass2 = Course(2, "python程序设计", "陈老师", "线下")

MyClass1.show_info()
MyClass2.show_info()


